package com.ymatou.iapi.thirdpartysync.testcase;

import java.util.ArrayList;
import java.util.List;

import org.junit.After;
import com.ymatou.iapi.thirdpartysync.parameter.*;
import com.ymatou.iapi.thirdpartysync.service.*;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import com.ymt.core.tool.Logger;
import com.ymt.utils.annotation.*;
import com.ymt.utils.tag.*;
/**
*获取抖音类目列表Test
*FreeMaker Template自动生成代码
*/
@TestSuite
public class Ts_GetDouyinCategoryList{
	private static GetDouyinCategoryListBean getdouyincategorylistBean;
	private static GetDouyinCategoryListCall getdouyincategorylistCall;
	@BeforeClass
	public static void setUp() {
		Logger.createResultFile("获取抖音类目列表Test");
	}

	@Before
	public void caseUp() {
		getdouyincategorylistBean=new GetDouyinCategoryListBean();
		getdouyincategorylistCall=new GetDouyinCategoryListCall();
	}

	@AfterClass
	public static void tearDown() {
		Logger.generateResult(getdouyincategorylistCall.getOpurl());
	}

	@After
	public void caseDown() {
		Logger.end();
	}
	@Test
	@Category({P1.class})
	@TestCase
	public void Tc_GetDouyinCategoryList_001() {
		Logger.start(true,"查询所有类目，成功");
		try {
			getdouyincategorylistBean.setParentId(0);
			getdouyincategorylistCall.setData(getdouyincategorylistBean);
			getdouyincategorylistCall.callService();			
			Logger.verifyEquals(true, getdouyincategorylistCall.getJsonObject().get("success").getAsBoolean(), "验证返回");
		} catch (Exception e) {
			Logger.fail(e);
		}
	}
}